package com.tour.controller.portal;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 页面跳转Controller
 * <p>Title: PageController</p>
 * <p>Description: </p>
 * <p>Company: www.itcast.cn</p> 
 * @version 1.0
 */
@Controller
public class PortalPageController{

	/**
	 * 首页跳转
	 * @return
	 */
	@RequestMapping("/")
	public String showIndex() {
		return "portal/tour_index";
	}
	
     /**
      * 通用页面跳转
      * @return
      */
     @RequestMapping("/to_{page}")
     public String to_tour_membercenter(@PathVariable String page) {
    	 return "portal/"+page;
     }

    @RequestMapping("/top_{page}_{cparam}")
 	public String showPageWithParam(@PathVariable String page, @PathVariable String cparam, Model  model) {
 		model.addAttribute("cparam",cparam);
 		return "portal/"+page;
 	}
}
